#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f;

void solve()
{
	int n;
	cin >> n;
	string s;
	cin >> s;
	int i = 1, j = n;
	vector<int> ans(n);
	for (int x = n - 1; x >= 1; x--)
	{
		if (s[x - 1] == '>') ans[x] = j--;
		else ans[x] = i++;
	}
	ans[0] = i;
	for (int i = 0; i < n; i++) cout << ans[i] << ' ';
	cout << endl;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}